const router = require('koa-router')();
const choose = require('../modules/choose');

//获取数据
router.get('/examchoose',async(ctx,next) => {
    ctx.body = await choose.getexamChoose();
})
//增加数据
router.post('/examchoose',async(ctx,next) => {
    ctx.body = await choose.addexamChoose(ctx.request.body);
})
//删除数据
router.delete('/examchoose/:choose_id',async(ctx,next) => {
    ctx.body = await choose.deleteexamChoose(ctx.params);
})
//修改数据
router.put('/examchoose',async(ctx,next)=>{
    ctx.body = await choose.putexamChoose(ctx.request.body);
})

module.exports = router;
